<template>
	<view style="position: relative;">
		<image class="img" src="./1001icon4.png" mode="widthFix"></image>
		<view class="backBtn" @tap="backBtn"></view>
		<view class="backBtn1" @tap="backBtn1"></view>
		<view class="backBtn2" @tap="backBtn2"></view>
		<view class="backBtn3" @tap="backBtn3"></view>
		<view class="list">{{list.balance.showBalance}}</view>
		<view class="list1">{{kaNum}}</view>
		<view class="list2" @tap="list2">{{bankTxt}}</view>
		<input class="ipt" type="text" placeholder="请输入" v-model="ipt"/>
		<input class="ipt1" type="text" placeholder="请输入" v-model="ipt1"/>
		<input class="ipt2" type="text" placeholder="请输入" v-model="ipt2"/>
		<!-- <view class="list2" style="color: #666666;">人民币元<span style="margin-left: 2vw;color: #222222;">{{list.balance.showBalance}}</span></view> -->
	</view>
</template>

<script>
	const http = require('../../../utils/http.js');
	export default {
		data() {
			return {
				list:null,
				kaNum:null,
				bankTxt:'请选择',
				ipt:'',
				ipt1:'',
				ipt2:''
			}
		},
		onLoad(options) {
			this.id=options.id
		},
		onShow() {
			http.get('/api/balance/getBalanceDetail',{balanceId:this.id}).then(res => {
				//console.log(res.result.balance.bankCode)
				//console.log(res.result.balance.bankCode.replace(/^(\w{4})\w{10}(.*)$/, '$1***$2'))
				if (res.code == 200 && res.result) {
					this.list=res.result
					this.kaNum=res.result.balance.bankCode.replace(/^(\w{4})\w{11}(.*)$/, '$1 ****** $2')
				}
			})
		},
		methods: {
			backBtn:function(){
				uni.navigateBack({
					delta: 1
				})
			},
			backBtn1:function(){
				uni.navigateTo({
				    url: '../1001?id='+this.id
				});
			},
			backBtn2:function(){
				// console.log(this.ipt)//name
				// console.log(this.ipt1)//账号
				// console.log(this.ipt2)//金额
				uni.navigateTo({
				    url: '1001-3?id='+this.id+'&ipt='+this.ipt+'&ipt1='+this.ipt1+'&ipt2='+this.ipt2+'&ipt3='+this.bankTxt
				});
			},
			backBtn3:function(){
				
				this.ipt2=this.list.balance.showBalance
				//console.log(this.ipt2.parseFloat(2))
			},
			list2:function(){
				this.bankTxt=this.list.bankText
			}
		}
	}
</script>

<style>
	page{
		color: #333333;
		font-family: 'jtfont-icon';
	}
	@font-face {
		font-family:jtfont-icon;
		src: url('~@/fonts/zhfont.ttf');
	}
	.backBtn{
		width: 10vw;
		height: 10vw;
		position: absolute;
		top: 9vw;
		left: 4vw;
	}
	.backBtn1{
		width: 25vw;
		height: 10vw;
		position: absolute;
		top: 101vw;
		left: 6.5vw;
	}
	.backBtn2{
		width: 80vw;
		height: 10vw;
		position: absolute;
		top: 193vw;
		left: 10vw;
	}
	.backBtn3{
		width: 18vw;
		height: 6vw;
		position: absolute;
		top: 38vw;
		right: 3vw;
	}
	.img{
		width: 100%;
	}
	.list{
		font-size: 3.6vw;
		color: #fc730b;
		position: absolute;
		top: 39.3vw;
		left: 34vw;
	}
	.list1{
		position: absolute;
		top: 27.5vw;
		right: 11vw;
		font-size: 3.6vw;
	}
	.list2{
		width: 80vw;
		height: 10vw;
		line-height: 10vw;
		text-align: right;
		position: absolute;
		top: 117.5vw;
		right: 11vw;
		color: #999999;
		font-size: 3.6vw;
	}
	.ipt{
		position: absolute;
		top: 93.8vw;
		left: 34vw;
		font-size: 3.2vw;
	}
	.ipt1{
		position: absolute;
		top: 107vw;
		left: 34vw;
		font-size: 3.2vw;
	}
	.ipt2{
		position: absolute;
		top: 73vw;
		left: 6vw;
		font-size: 7vw;
		color: #f40;
	}
</style>
